package com.aaa.a1103.demo03;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test03 {
    public static void main(String[] args) {
       Operator o=arr -> arr.length;
       fun(o);
    }

    public static void fun(Operator operator) {
        int sum[] = {64,87,31,9,49,97,999};
        int sum1 = operator.getSum(sum);
        System.out.println("数组中元素的个数:" + sum1);
    }
}

interface Operator {
    public int getSum(int[] arr);
}
